package com.ruoyi.common.core.domain;
import org.apache.http.HttpStatus;

public enum ResponseCode {
    success(200, "成功"),
    no_access(403, "无权限"),
    no_login(401, "未登录"),
    normally_error(-1, "业务异常"),
    error(HttpStatus.SC_INTERNAL_SERVER_ERROR, "未知异常，请联系管理员");


    private int code;
    private String msg;

    ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return "ResponseCode{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                '}';
    }
}
